package com.wsx.ones.cloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;

/**
 * Created by wangshuaixin on 17/5/9.
 */
@SpringBootApplication
@EnableFeignClients
@EnableHystrix
@EnableHystrixDashboard
public class EurekaHystrixStart {

    public static void main(String[] args) {
        SpringApplication.run(EurekaHystrixStart.class, args);

        //加入钩子，服务运行失败
        /**
        Runtime.getRuntime().addShutdownHook(new Thread(){
            @Override
            public void run() {
                DiscoveryManager.getInstance().shutdownComponent();
            }
        });
         */
    }
}
